<template>
  <el-carousel :interval="5000" arrow="always">
    <el-carousel-item v-for="item in bannerItems" :key="item">
      <img :src="item">
    </el-carousel-item>
  </el-carousel>
</template>

<script>
export default {
  props: {
    bannerItems: {
      type: Array,
      default() {
        return []
      }
    }
  }
}
</script>
<style scoped lang="less">
  .el-carousel__item {
    img {
      width: 100%;
      height: 100%;
    }
  }

  .el-carousel__item:nth-child(2n) {
    background-color: #99a9bf;
  }

  .el-carousel__item:nth-child(2n+1) {
    background-color: #d3dce6;
  }
</style>